package com.hzq.htest.ui.login.model;


import com.hzq.htest.api.Api;
import com.hzq.htest.ui.login.bean.LoginfoBean;
import com.hzq.htest.ui.login.contract.LoginContract;

import kstar.mycommon.baserx.RxSchedulers;
import okhttp3.RequestBody;
import rx.Observable;

import static com.hzq.htest.api.HostType.NORMAL_SERVER_PORT;

/**
 * Created by ${GuoZhaoHui} on 2017/9/20.
 * email:guozhaohui628@gmail.com
 */

public class LoginModel implements LoginContract.Model {

    @Override
    public Observable<LoginfoBean> getLoginInfo(RequestBody requestBody) {
        return Api.getApiService(NORMAL_SERVER_PORT).login(Api.getCacheControl(),requestBody).compose(RxSchedulers.<LoginfoBean>io_main());

    }
}
